<!--分销商订单列表-->
<div class="col-sm-12 mt20" ng-keyup="myKeyup($event)">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">

    <div class="row ">
        <div class="col-sm-2">
            <input type="text" class="form-control"  ng-model="order_code" placeholder="订单编号"> 
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="order_name" placeholder="订单名">
        </div>
      
        <div class="col-sm-2">
            <ui-select ng-model="a.pay_state" theme="bootstrap" >
                <ui-select-match placeholder="支付状态">
                    {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in zhifu | filter: $select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" is-open="start.opened" readonly ng-click="open(start)" placeholder="出发团期开始时间"/>
        </div>
          <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.lable" is-open="end.opened" readonly ng-click="open(end)" placeholder="出发团期结束时间"/>
        </div>
         
      
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="product_id" placeholder="产品编号"> 
        </div>
        
      
     </div>
        
         
    

    <div class="row mt10">
        <div class="col-sm-2">
             <input type="text" class="form-control" ng-model="supplier_product_name" placeholder="供应商名称"> 
        </div>
        <div class="col-sm-2">
           <ui-select ng-model="a.order_state" theme="bootstrap" >
                <ui-select-match placeholder="订单状态">
                    {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in dingdan | filter: $select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
        <div class="col-sm-2">
         <ui-select ng-model="a.cancel_state" theme="bootstrap" >
                <ui-select-match placeholder="取消状态">
                    {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in quxiao | filter: $select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
             
        </div>
        <div class="col-sm-2">
            <ui-select ng-model="a.upplier_check_state" theme="bootstrap" >
                <ui-select-match placeholder="审核状态">
                    {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in shenhe | filter: $select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>

        <div class="col-sm-2 col-sm-offset-2">
            <button class="btn btn-block btn-info" ng-click="search()">搜索</button> 
        </div>

    </div>

</div>
</div>
</div>
<!-- searchArea -->

<div class="panel panel-default">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered" style="display: table; width: 100%;table-layout:fixed;">
            <thead>
                <tr>
     
                   <th style="width: 16%;text-align:center;padding-left:0px;padding-right:0px;">订单名/订单编号</th>
                    <th style="width: 15%;text-align:center;padding-left:0px;padding-right:0px;">供应商产品名称/编号</th>
                    <th style="width: 5%;text-align:center;padding-left:0px;padding-right:0px;">供应商</th>
                    <th style="width: 10%;text-align:center;padding-left:0px;padding-right:0px;">团期(出/回)</th>
                    <th style="width: 4%;text-align:center;padding-left:0px;padding-right:0px;">人数</th>
                    <th style="width: 5%;text-align:center;padding-left:0px;padding-right:0px;">总金额</th>                    
                    <th style="width: 7%;text-align:center;padding-left:0px;padding-right:0px;">订单状态</th>
                    <th style="width: 7%;text-align:center;padding-left:0px;padding-right:0px;">支付状态</th>
                    <th style="width: 7%;text-align:center;padding-left:0px;padding-right:0px;">审核状态</th>
                    <th style="width: 9%;text-align:center;padding-left:0px;padding-right:0px;">审核驳回原因</th>
                    <th style="width: 9%;text-align:center;padding-left:0px;padding-right:0px;">退款驳回原因</th>
                    <th style="width: 8%;text-align:center;padding-left:0px;padding-right:0px;">操作</th>
                  
                   

                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="info in a">
                    <td  style="width: 15%;vertical-align:middle; padding:4px"><div class="ellipsis" style="text-align:center;max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.order_name}}">{{info.order_name}}</div><div class="ellipsis" style="text-align:center;max-width:100%;" title="{{info.order_code}}">{{info.order_code}}</div></td>
                    <td  style="width: 15%;vertical-align:middle; padding:4px"><div class="ellipsis" style="text-align:center;max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.supplier_product_name}}">{{info.supplier_product_name}}</div><div class="ellipsis" style="text-align:center;max-width:100%;" title="{{info.product_id}}">{{info.product_id}}</div></td>
                    <td  style="width: 7%;vertical-align:middle;padding:4px;text-align:center;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.create_by}}">{{info.create_by}}</div></td>
                    <td  style="width: 9% ;vertical-align:middle;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.tour_date}}">{{info.tour_date}}</div><div class="ellipsis" style="max-width:100%;" title="{{info.back_tour_date}}">{{info.back_tour_date}}</div></td>
                    <td  style="width: 5%;vertical-align:middle;text-align:center;overflow-x:hidden;overflow-y:hidden;">{{info.people_num}}</td>
                    <td  style="width: 7%;vertical-align:middle;text-align:center;overflow-x:hidden;overflow-y:hidden;" title="{{info.money}}">{{info.money}}</td>
                    <td  style="width: 7%;vertical-align:middle;text-align:center;padding:0px;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.order_state_name}}"></div>{{info.order_state_name}}</td>
                    <td  style="width: 5%;text-align:center;vertical-align:middle;overflow-x:hidden;overflow-y:hidden;padding: 0px">{{info.pay_state_name}}</td>
                    <td  style="width: 7%;text-align:center;vertical-align:middle;overflow-x:hidden;overflow-y:hidden;padding: 0px">{{info.upplier_check_state_name}}</td>
                    <td  style="width: 7%;vertical-align:middle;text-align:center;overflow-x:hidden;overflow-y:hidden;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.back_remarkss}}">{{info.back_remarkss}}</div></td>
                    <td  style="width: 8% ;vertical-align:middle;text-align:center;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.reject_remark}}">{{info.reject_remark}}</div></td>
                    <td  style="width: 8%;text-align:center;vertical-align: middle" ng-if = "info.b=='1'&&info.pay_state_name!='已支付'">
                        <div class="btn-group" dropdown="" style="text-align:center;vertical-align: middle">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" style="width: 60px">
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >
                                    <li>
                                        <a ng-click="distributor_toinfo(info)" >详情</a>
                                    </li>
                                    <li>
                                        <a ng-click="distributor_tourinfo(info)" ng-show="info.order_state_name!='超时未付款，已取消订单'">游客信息</a>
                                    </li>
                                    <li>
                                        <a ng-click="distributor_pay(info)" ng-show="info.order_state_name!='超时未付款，已取消订单'">支付</a>
                                    </li>
                                    <li >
                                        <a ng-click="toinfo1(info)" ng-show="info.order_state_name=='已付款,待确认'||info.order_state_name=='开心出游'||info.order_state_name=='申请退款失败'">申请退款</a>
                                    </li>
                                </ul>
                        </div>
                    </td>
                     
                    <td  style="width: 10%;text-align:center;" ng-if = "info.b=='1'&&info.pay_state_name=='已支付'">
                        <div class="btn-group" dropdown="">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" style="width: 60px">
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >
                                    <li>
                                        <a ng-click="distributor_toinfo(info)" >详情</a>
                                    </li>
                                    <li>
                                        <a ng-click="distributor_tourinfo(info)" ng-show="info.order_state_name!='超时未付款，已取消订单'">游客信息</a>
                                    </li>
                                    <li >
                                        <a ng-click="toinfo1(info)" ng-show="info.order_state_name=='已付款,待确认'||info.order_state_name=='开心出游'||info.order_state_name=='申请退款失败'">申请退款</a>
                                    </li>
                                    <li >
                                        <a ng-click="changestate(info)" ng-show="info.upplier_check_state_name=='已审核'&&info.order_state_name=='申请退款失败'">开心出游</a>
                                    </li>
                                </ul>
                        </div>
                      </td>  
                        <td  style="width: 10%;text-align:center;" ng-if = "info.b=='0'">
                        <div class="btn-group" dropdown="">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" style="width: 60px">
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >
                                    <li>
                                        <a ng-click="distributor_toinfo(info)" >详情</a>
                                    </li>
                                    <li>
                                        <a ng-click="distributor_tourinfo(info)" ng-show="info.order_state_name!='超时未付款，已取消订单'">游客信息</a>
                                    </li>
                                    <li >
                                        <a ng-click="toinfo1(info)" ng-show="info.order_state_name=='已付款,待确认'||info.order_state_name=='开心出游'||info.order_state_name=='申请退款失败'">申请退款</a>
                                    </li>
                                </ul>
                        </div>
                       </td> 
                </tr>
            </tbody>
        </table>
        <div class="text-right">
            <pagination 
        total-items="totalItems" 
        ng-model="currentPage1" 
        ng-change="pageChanged1()"
        previous-text="上一页" 
        next-text="下一页" 
        first-text="首页" 
        last-text="尾页" 
        max-size="5" 
        boundary-links="true"
        rotate="false"
        
        items-per-page="itemsPerPage"
        class="m-t-none m-b"></pagination>
        </div>
    </div>
</div>

</div>
